e789f6321070fee68fcf4b4880440fb17e31c35f,examples/VerletPhysics_Dev/VerletPhysics_Dev.java,VerletPhysics_Dev,draw,#,212
Before Change
// render
if(DISPLAY_MODE == 0){
// particles
for(SoftBody body : softbodies){
body.drawParticles(this.g);
}
// spring types
for(SoftBody body : softbodies){
body.drawSprings(this.g, SpringConstraint.TYPE.BEND );
body.drawSprings(this.g, SpringConstraint.TYPE.SHEAR );
body.drawSprings(this.g, SpringConstraint.TYPE.STRUCT);
}
After Change
background(DISPLAY_MODE == 0 ? 255 : 92);
// 1) particles
if(DISPLAY_PARTICLES){
for(SoftBody2D body : softbodies){
body.use_particles_color = (DISPLAY_MODE == 0);
body.drawParticles(this.g);
}
}
// 2) springs
for(SoftBody2D body : softbodies){
if(DISPLAY_SPRINGS_BEND ) body.drawSprings(this.g, SpringConstraint.TYPE.BEND , DISPLAY_MODE);
if(DISPLAY_SPRINGS_SHEAR ) body.drawSprings(this.g, SpringConstraint.TYPE.SHEAR , DISPLAY_MODE);
if(DISPLAY_SPRINGS_STRUCT) body.drawSprings(this.g, SpringConstraint.TYPE.STRUCT, DISPLAY_MODE);
}